<template>
  <!--数组内的每一项为声明的变量-->
  <div v-bind:class="[state.redClass, state.fontSizeClass]">我是尼克陈</div>
</template>
<script>
import {reactive} from 'vue'
export default{
  setup(){
    const state = reactive({
      redClass: 'red', //颜色变量名redClass声明，对应类red
      fontSizeClass: 'big' //字号变量名fontSizeClass声明，big
    })
    return {state}
  }
}
</script>
<!--类名所对应的样式-->
<style scoped>
.red{
  color: red
}
.big{
  font-size:40px;
}
</style>